# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Marcos Heredia <chelqo@gmail.com>
# Contributor: Joris Steyn <jorissteyn@gmail.com>
# Contributor: speps <speps at aur dot archlinux dot org>
# Contributor: Roman Kyrylych <roman@archlinux.org>
# Contributor: orelien <aurelien.foret@wanadoo.fr>
# Contributor: Muflone <webreg@vbsimple.net>

pkgname=httrack
pkgver=3.49.4
pkgrel=1
pkgdesc="An easy-to-use offline browser utility"
arch=('loong64' 'x86_64')
url="https://www.httrack.com/"
license=('GPL3')
depends=('bash' 'xdg-utils' 'hicolor-icon-theme' 'openssl')
makedepends=('git')
_commit=4f24477a13e53346577691a0193e588e9ba992aa
source=("git+https://github.com/xroche/httrack.git#commit=$_commit")
# https://github.com/xroche/httrack/issues/243
# source=(https://mirror.httrack.com/historical/$pkgname-$pkgver.tar.gz{,.asc})
# validpgpkeys=('BB71C7E6CB1AD8FAF53FE42A60C3AA7180598EFB') # Xavier Roche
sha256sums=('SKIP')

prepare() {
  cd "${srcdir}"/$pkgname

  git submodule update --init --recursive
}

build() {
  cd "${srcdir}"/$pkgname

  ./configure --prefix=/usr --enable-static=no
  make
}

package() {
  cd "${srcdir}"/$pkgname

  make DESTDIR="${pkgdir}" install
}
